package com.common.jiji.methods;

import com.common.jiji.JJDriverService;
import com.common.jiji.entity.BaseJJBean;
import com.common.jiji.entity.LoginBean;
import com.common.jiji.parms.LoginParms;
import com.common.jiji.parms.OrderDellistParms;
import com.common.retrofit.base.BaseMethods;

import rx.Observable;
import rx.Subscriber;

public class DateOrderMethods extends BaseMethods {

    private static DateOrderMethods m_ins = null;

    public static DateOrderMethods getInstance() {
        if (m_ins == null) {
            synchronized (DateOrderMethods.class) {
                if (m_ins == null) {
                    m_ins = new DateOrderMethods();
                }
            }
        }
        return m_ins;
    }

    @Override
    protected String getHttpUrl() {
        return "driver/";
    }

    private JJDriverService initService() {
        return getRetrofit().create(JJDriverService.class);
    }


    public void     getOrderListByDate(Subscriber<BaseJJBean> subscriber
            , OrderDellistParms loginParms
    ) {

        Observable observable = initService().getOrderListByDate(loginParms);
        toOtherSubscribe(observable, subscriber);
    }
}
